// 权限接口管理
import request from "@/utils/request";

const API = {
  MENU_LIST: "/menu/list",
  MENU_CREATE_OR_EDIT: "/menu/createOrEdit",
  MENU_REMOVE: "menu/remove",
  MENU_GET_BY_ID: "menu/getById",
}

export const list = () => request.get(API.MENU_LIST);

export const userCreateOrEdit = (data) =>
  request.post(API.MENU_CREATE_OR_EDIT, data);

export const menuRemove = (id) =>
  request.delete(API.MENU_REMOVE + `/${id}`);

export const menuGetById = (id) =>
  request.get(API.MENU_GET_BY_ID + `/${id}`);
